package com.hzit.handler;

import com.hzit.util.R;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * 类名：
 * 作者：WF
 * 功能：
 */
@RestControllerAdvice
public class HzitGloblExceptionHandler {

	@ExceptionHandler(RuntimeException.class)
	public R handlerRuntimeException(RuntimeException e){
		return R.fail(HttpStatus.FORBIDDEN.value(),e.getMessage());
	}
}
